package com.shop2cn.iapi.wxcomponent.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.shop2cn.iapi.wxcomponent.parameter.RefreshMchAppTokenBean;
import com.shop2cn.iapi.wxcomponent.service.RefreshMchAppTokenCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
/**
*刷新小程序令牌
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_RefreshMchAppToken{
	private static RefreshMchAppTokenBean refreshmchapptokenBean;
	private static RefreshMchAppTokenCall refreshmchapptokenCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("刷新小程序令牌");
	}

	@Before
	public void caseUp() {
		refreshmchapptokenBean=new RefreshMchAppTokenBean();
		refreshmchapptokenCall=new RefreshMchAppTokenCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(refreshmchapptokenCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
//	 curl -X POST -d "{\"bizid\":1100,\"guid\":0}" -H "User-Agent: Ebit/13.3" http://dc.qq.com/ebitapi/speedup/open 
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_RefreshMchAppToken_001() {
		Logger.start(true,"刷新小程序令牌");
		try {
			//调用正式环境 只验证返回
			refreshmchapptokenCall.setData(refreshmchapptokenBean);
			refreshmchapptokenCall.callService();			
			Logger.verifyEquals("ok", refreshmchapptokenCall.getReturnData(), "验证返回");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}